package com.youlu.campus.base.base;


import lombok.Data;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.Id;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.mongodb.core.index.Indexed;

import java.io.Serializable;
import java.util.Date;

/**
 * 基础实体类
 *
 * @author: zhugz
 * @date: 2020/10/27 10:17
 */
@Data
public class EntityBase implements Serializable{

    @Id
    private String id;

    /**
     * 是否删除
     */
    //@Indexed
    private Boolean deleted = false;

    /**
     * 创建时间
     */
    //@Indexed
    @CreatedDate
    private Date createdTime;

    /**
     * 最后更新时间
     */
    @LastModifiedDate
    private Date updatedTime;

    /**
     * 创建人ID
     */
    private String creatorId;
    /**
     * 租户ID
     */
    private String tenantId;
    /**
     * 租户名字
     */
    private String tenantName;

    private Date deletedTime;


}
